Use mod_proxy #1
2014/09/15 |
Enable mod_proxy and configute httpd as a forward proxy.
|
|
[1] | Configure httpd to enable mod_proxy. |
[root@www ~]#
vi /etc/httpd/conf.d/f_proxy.conf # create new
<IfModule mod_proxy.c>
# forward proxy function ON ProxyRequests On <Proxy *> Order deny,allow Deny from all Allow from 10.0.0.0/24 </Proxy> </IfModule> # set disk cache <IfModule mod_cache.c> <IfModule mod_disk_cache.c> # cache directory CacheRoot /var/cache/httpd # all URL are cache target CacheEnable disk / </IfModule> </IfModule>
[root@www ~]#
vi /etc/httpd/conf/httpd.conf # line 136: chnage listening port Listen 8080
/etc/rc.d/init.d/httpd restart Stopping httpd: [ OK ] Starting httpd: [ OK ] |
[2] |
Configure your client PC for proxy client
and make sure httpd is working as a forward proxy.
|